	<!-- BEGIN PAGE -->
	<div class="page-content">
         <!-- BEGIN PAGE CONTAINER-->        
         <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->
			<div class="row-fluid">
				<div class="span12"> 
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->			
					<h3 class="page-title">
						Identitas Sekolah <small>pengaturan identitas sekolah</small>
					</h3>
					<ul class="breadcrumb">
						<li>
							<i class="icon-cogs"></i>
							Pengaturan Awal	
							<i class="icon-angle-right"></i>
						</li>
						<li>Identitas Sekolah</li>	
					</ul>
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN PAGE CONTENT-->          
            <div class="row-fluid">
               <div class="span12">
                  <!-- BEGIN SAMPLE TABLE PORTLET-->
                  <div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-cogs"></i>List Identitas Sekolah</div>
						
                     </div>
                     <div class="portlet-body flip-scroll">
					  <div class="control-group">
						  <form action="<?php echo base_url()."identitasSekolah"?>" method="post">
							<div class="row-fluid">
								<div class="span3">
									<div class="control-group">
										<label class="control-label">Departemen</label>
											<div class="controls">
												<select class="span6 m-wrap medium" id="q" name="departemen_id" data-placeholder="Choose a Category" tabindex="1">
													<option value="">Pilih Departemen</option>
													<?php foreach($departemen->result_array() as $row){?>
													 <option value="<?php echo $row['departemen_id']?>" <?php echo $row['departemen_id'] == $departemen_id?'selected="selected"':'' ?>><?php echo $row['nama']?></option>
													<?php } ?>
												</select>
											</div>
										</div>
									</div>
								</div>
						  </form>
					 </div>
					<table class="table table-bordered table-hover">
							<thead>
                              <tr>
                                 <th>Logo Sekolah</th>
                                 <th>Header</th>
                              </tr>
                           </thead>
                           <tbody>
						   <?php
								$cek = false;
								foreach($identitas->result_array() as $row){
									$cek = true;
								  echo "<tr>";
								  echo "<td style=\"width:25%;\"><img src=\"data:image/png;base64,".base64_encode($row['foto'])."\" width=\"190\" height=\"250\" alt=\"\" />
										</td>";
								  echo "<td>
											<h1><strong>$row[nama]</strong></h1>
											<h6><strong>
												Alamat :$row[alamat1]<br/>
												Phone  : $row[telp1]<br/>
												Website:$row[situs]<br />
												Email  : $row[email]<br/>
												<strong>
											</h6></td>";
								  echo "</tr>";
								  echo "<tr>";
								  echo "<td colspan=\"2\">
											<a href=\"".base_url()."identitasSekolah/form/".encode($row['identitas_id'])."/".encode($row['departemen_id'])."\" title=\"Edit\" class=\"btn mini green\"><i class=\"icon-edit\"></i> Edit</a>
											<a href=\"".base_url()."identitasSekolah/topdf/".encode($row['identitas_id'])."/".encode($row['departemen_id'])."\" title=\"Hapus\" class=\"btn mini blue\"><i class=\"icon-print\"></i> Cetak</a>";
											if($row['identitas_id'] != 	2){
											echo " <a href=\"".base_url()."identitasSekolah/delete/".encode($row['identitas_id'])."\" title=\"Hapus\" class=\"btn mini red\" onClick=\"return confirm('Data akan dihapus. Lanjutkan ?')\"><i class=\"icon-trash\"></i> Hapus</a>";
											}
											
								echo "</td>";
								  echo "<tr>";
							  }
							  
							  if($cek == false){
								echo "<tr>";
								echo "<td colspan='10'><div align='center'>Data Masih Kosong Klik <a href=\"".base_url()."identitasSekolah/form/".encode(0)."/".encode($departemen_id)."\" class=\"btn mini green\" title=\"Tambah identitas\" /><i class=\"icon-plus\"></i> Tambah </a> Untuk Memasukan data Identitas Sekolah</div></td>";
								echo "</tr>";
							} 
							 ?>
                           </tbody>
					</table>
					 <?php /*
                        <table class="table table-bordered table-striped table-condensed flip-content table-hover">
							<thead class="flip-content">
								<tr>
									<tr>
										<th align="center">Departemen</th>
										<th align="center">Nama</th>
										<th align="center">Situs</th>
										<th align="center">Email</th>
										<th align="center">alamat 1</th>
																			
										<th align="center">Telp 1</th>
																			
										<th align="center">Fax 1</th>
										
										<th align="center">Keterangan</th>
										<th align="center">Status</th>
										<th align="center">Aksi</th>
									</tr>
								</tr>
							</thead>
                           <tbody>
								<?php
									$cek = false;
									
									foreach($identitas->result_array() as $row){
										$cek = true;	
										echo "<tr>";
										echo "<td>$row[name]</td>";
										echo "<td>$row[nama]</td>";
										echo "<td>$row[situs]</td>";
										echo "<td>$row[email]</td>";
										echo "<td>$row[alamat1]</td>";
										
										echo "<td>$row[telp1]</td>";
										
										echo "<td>$row[fax1]</td>";
										
										echo "<td>$row[keterangan]</td>";
										echo "<td>$row[status]</td>";
										if($row['identitas_id']=='1'){
										echo "<td align='center'>
										<a href=\"".base_url()."identitasSekolah/form/".encode($row['identitas_id'])."/".encode($row['departemen_id'])."\" title=\"Edit\" class=\"btn mini green\"><i class=\"icon-edit\"></i> Edit</a>
										</td>";
										} else {
											echo "<td align='center'>
										<a href=\"".base_url()."identitasSekolah/form/".encode($row['identitas_id'])."/".encode($row['departemen_id'])."\" title=\"Edit\" class=\"btn mini green\"><i class=\"icon-edit\"></i> Edit</a>
										<a href=\"".base_url()."identitasSekolah/delete/".encode($row['identitas_id'])."\" title=\"Hapus\" class=\"btn mini red\" onClick=\"return confirm('Data akan dihapus. Lanjutkan ?')\"><i class=\"icon-trash\"></i> Hapus</a>
										</td>";
										}
										echo "</tr>";
									
									}
									if($cek == false){
										echo "<tr>";
										echo "<td colspan='10'><div align='center'>Data Masih Kosong Klik <a href=\"".base_url()."identitasSekolah/form/".encode(0)."/".encode($departemen_id)."\" class=\"btn mini green\" title=\"Tambah identitas\" /><i class=\"icon-plus\"></i> Tambah </a> Untuk Memasukan data Identitas Sekolah</div></td>";
										echo "</tr>";
									} 
								?>
                           </tbody>
                       </table>
					   */?>
                     </div>
                  </div>
                  <!-- END SAMPLE TABLE PORTLET-->
               </div>              
            </div>
           
            <!-- END PAGE CONTENT-->
         </div>
         <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
	<?php $this->load->view('template/messages'); ?>
	
	<script>
			$(document).ready(function(){
				$('#q').change(function () {
					this.form.submit();
				})
				
			});
			
	</script>